import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
from selenium.webdriver.support.select import Select
testCase="DBshop015_后台商品管理-添加侧边设置流程"

firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,'商品管理','管理分类','前台侧边设置')
firefox.find_element_by_xpath('//a[text()=" 添加侧边显示"]').click()
firefox.find_element_by_id('frontside_name').send_keys('网站很好看')
firefox.find_element_by_id('frontside_sort').clear()
time.sleep(1)
firefox.find_element_by_id('frontside_sort').send_keys(255)
firefox.find_element_by_xpath('//button').click()

# try:
#     firefox.find_element_by_xpath('//td[contains(.,"%s")]'%goodsClassName).is_displayed()
#     writeLog("%s 测试失败"%testCase)
#     getPhoto(firefox)
# except:
#     writeLog("%s 测试通过" % testCase)

firefox.quit()
